package edu.upenn.pcr.dao;

import edu.upenn.pcr.model.db.PennCourseReviewDBMgr;
import edu.upenn.pcr.model.db.dao.CourseDAO;
import edu.upenn.pcr.model.db.entity.Course;
import edu.upenn.pcr.test.AndroidTestCaseBase;

public class CourseDAOTest extends AndroidTestCaseBase {

	private PennCourseReviewDBMgr dbMgr;
	protected void setUp() throws Exception {
		super.setUp();
		dbMgr = PennCourseReviewDBMgr.getInstance(this.getTestContext());
	}
	
	public void testFindById() {
		CourseDAO dao = dbMgr.getCourseDAO();
		Course course = new Course();
		course.setId("265");
		course.setName("ALGORITHM");
		course.setViewed(0);
		dao.add(course);
		Course find = dao.findById("265");
		assertNotNull(find);
	}
}
